﻿  using System;
using System.IO;
using System.Collections.ObjectModel;
using System.Text;

using System.Xml;
using System.Xml.Serialization;
using cz.uhul.DSMLv2;
using cz.uhul.DSMLv2.Server.Sql;

namespace testDSML
{
  public class testSrchRequest
  {

    public static void go()
    {


      LdRequestDocument rq = new LdRequestDocument()
      {
        SearchRequests = new LdRequestsCollection()
        { 
          new LdSearchRequest()
          {
            DistinguishedName = ""
            ,Scope = LdSearchScopeEnum.wholeSubtree
            ,Filter = new FilterGroup()
            {
              Present = new PresentOp()
              {
                Name = "objectClass"
              } 
            }
          }
        }
      };

      Console.WriteLine(rq.ToXml().InnerXml.ToString());

      LdResponseDocument outP = LdRequestServerExtension.ProcessBatch(rq);

      Console.WriteLine(outP.ToXml().InnerXml.ToString());


    }






  }

}
